﻿<BSButton Color="Color.Primary" OnClick="onclick">Toggle</BSButton>
<BSCollapse IsOpen="@IsOpen">
    <BSCard CardType="CardType.Card">
        <BSCard CardType="CardType.Text">Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.</BSCard>
    </BSCard>
</BSCollapse>

@code {
    bool IsOpen { get; set; }
    void onclick(MouseEventArgs e)
    {
        IsOpen = !IsOpen;
        StateHasChanged();
    }
}